package com.example.testcontainer;

import java.util.List;

import com.example.testcontainer.dto.CustomInfo;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class CustomerController {

    private final ExternalCustomClient customClient;

    CustomerController(ExternalCustomClient customClient) {
        this.customClient = customClient;
    }

    @GetMapping("/api/customers/{id}")
    CustomInfo getAll(@PathVariable String id) {

        return customClient.getCustom(id);
    }
}
